<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/include/taglibs.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <title>【${tenant.wechatName}】充电运营服务平台</title>
    <%@include file="/include/header.html" %>
<%--    <link rel="stylesheet" href="${ctx}/statics/css/newEdition.css">--%>
    <script src="${ctx}/libjs/plugins/flexible/flexible.js"></script>
    <script src="${ctx}/libjs/plugins/flexible/flexible_css.js"></script>
    <style>
        .logos {
            cursor: pointer
        }

        /*.layui-nav-tree .layui-nav-item a{ line-height: 0.35rem; height: 0.35rem; font-size: 0.09rem !important;}*/
        .activeChildLias {
            color: #278CED !important;
        }
        /*.layui-layout-left, .layui-body {
            left: 1.75rem;
        }*/
        #otherlogo{width: 1.8rem}
</style>
</head>
<script>
    var addressed = window.location.host;
</script>
<%--gray-bg--%>
<body class="layui-layout-body mini-navbar">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <c:choose>
            <c:when test="${tenant.tenantLogoImg!=null && tenant.tenantLogoImg!=''}">
                <div onclick="location.href='${ctx}/welcome'" class="layui-logo logos" id="otherlogo"
                     style="display: inline-block;background-image:url('${tenant.tenantLogoImg}')"></div>
                    <h3 style="font-size: 0.165rem;line-height: 0.45rem;color: #fff;text-indent: 0.1rem;">瑞晨充电运营服务平台</h3>
            </c:when>
            <c:otherwise>
                <%--<div class="layui-logo" id="otherlogo" style="display: inline-block;"></div>--%>
                <div onclick="location.href='${ctx}/welcome'" class="layui-logo logos" id="logo"
                     style="display: inline-block;"></div>
            </c:otherwise>
        </c:choose>
        <ul class="layui-nav layui-layout-right">
            <%--<li class="navbar-minimalize">--%>
                <%--<a href="">--%>
                    <%--<img src="${ctx}/statics/img/newEdition/foldIcon.png" class="layui-nav-img">--%>
                <%--</a>--%>
            <%--</li>--%>
            <li class="">

                <a href="#"  class="big_bell"  >
                    <img src="${ctx}/statics/img/newEdition/bell2.png" class="layui-nav-img pic_fa">
                    <div class="pic_num" aaa="1"></div>
                </a>
            </li>

            <li class="">
                <a href="${ctx}/tenant/user/info">
                    <img src="${ctx}/statics/img/newEdition/userNameIcon.png" class="layui-nav-img">
                    ${user.loginName}
                </a>
            </li>
            <li class="">
                <a href="${ctx}/goLogout">
                    <img src="${ctx}/statics/img/newEdition/logoutIcon.png" class="layui-nav-img">
                    退出
                </a>
            </li>
        </ul>
    </div>

    <div class="layui-side" style="width: 1.8rem" >
        <ul class="layui-nav layui-nav-tree" lay-filter="demo" lay-shrink="all" style="margin-right: 10px; ">
<%--            <li class="layui-nav-item" ><a href="${ctx}/welcome" class="fiter">首页</a></li>--%>
            <c:forEach items="${topMenus}" var="menu" varStatus="status">
                <c:choose>
                    <c:when test="${status.index == 0}">
                        <li class="layui-nav-item layui-nav-itemed">
                    </c:when>
                    <c:otherwise>
                        <li class="layui-nav-item" >
                    </c:otherwise>
                </c:choose>
                <a href="javascript:;">${menu.name}</a>
                <dl class="layui-nav-child">
                    <c:forEach items="${menu.childList}" var="cmenu" varStatus="index">
                        <dd><a href="${ctx}${cmenu.attributes.url}" <c:if test="${status.index == 0}">class="activeChildLia" </c:if> target="iframe0">
                            <i class="${cmenu.attributes.icon}"></i>
                            <span class="nav-label">${cmenu.text}</span>
                        </a></dd>
                    </c:forEach>
                </dl>
                </li>
            </c:forEach>
                <%--<li class="layui-nav-item" >
                    <a  <c:if test="${menu.menuId == topMenuId}">class="activeChildLia" </c:if>   href="${ctx}${menu.url}">${menu.name}</a>
                </li>--%>
<%--
                <ul class="layui-nav layui-nav-tree layui-inline" lay-filter="demo" style="margin-right: 10px;">
                    <li class="layui-nav-item layui-nav-itemed">
                        <a href="javascript:;">默认展开</a>
                        <dl class="layui-nav-child">
                            <dd><a href="javascript:;">选项一</a></dd>
                            <dd><a href="javascript:;">选项二</a></dd>
                            <dd><a href="javascript:;">选项三</a></dd>
                            <dd><a href="">跳转项</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item">
                        <a href="javascript:;">解决方案</a>
                        <dl class="layui-nav-child">
                            <dd><a href="">移动模块</a></dd>
                            <dd><a href="">后台模版</a></dd>
                            <dd><a href="">电商平台</a></dd>
                        </dl>
                    </li>
                    <li class="layui-nav-item"><a href="">云市场</a></li>
                    <li class="layui-nav-item"><a href="">社区</a></li>
                </ul>
                --%>
<%--            </c:forEach>--%>
        </ul>
<%--
        <div class="layui-side-scroll" style="margin-left: 0.5rem; position: absolute; top: 0.2rem;left: 0.18rem">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <ul class="layui-nav layui-nav-tree metismenu" id="side-menu" lay-filter="test">
                <c:choose>
                    <c:when test="${leftMenus!=null && fn:length(leftMenus) > 0}">
                        <c:forEach items="${leftMenus}" var="menu">
                            <li class="layui-nav-item layui-nav-itemed ">

                                <dl class="layui-nav-child">
                                    <c:forEach items="${menu.children}" var="cmenu" varStatus="index">
                                        <c:choose>
                                            <c:when test="${index.index eq '0'}">
                                                <dd><a href="${ctx}${cmenu.attributes.url}" class="activeChildLias"
                                                       target="iframe0">
                                                    <i class="${cmenu.attributes.icon}"></i>
                                                    <span class="nav-label">${cmenu.text}</span>
                                                </a></dd>
                                            </c:when>
                                            <c:otherwise>
                                                <dd><a href="${ctx}${cmenu.attributes.url}" target="iframe0">
                                                    <i class="${cmenu.attributes.icon}"></i>
                                                    <span class="nav-label">${cmenu.text}</span>
                                                </a></dd>
                                            </c:otherwise>
                                        </c:choose>
                                    </c:forEach>
                                </dl>
                            </li>
                        </c:forEach>
                    </c:when>
                    <c:otherwise>
                        <c:if test="${user.userType != '2'}">
                            <li class="layui-nav-item layui-nav-itemed">

                            </li>
                        </c:if>
                        &lt;%&ndash;<c:if test="${user.userType == '0'}">&ndash;%&gt;
                        <li class="layui-nav-item layui-nav-itemed">
                            <a href="${ctx}/basic" target="iframe0"><i class="fa fa-user-o"></i> <span
                                    class="nav-label">基本信息</span> </a>
                        </li>
                        &lt;%&ndash;</c:if>&ndash;%&gt;

                        <c:if test="${user.userType == '0' || user.userType == '3'}">
                            <li class="layui-nav-item layui-nav-itemed">
                                <a href="${ctx}/statistics/index" target="iframe0"><i class="fa fa-sticky-note-o"></i>
                                    <span
                                            class="nav-label">控制台</span> </a>
                            </li>
                        </c:if>

                        <c:if test="${user.userType == '0' || user.userType == '3'}">
                            <li class="layui-nav-item layui-nav-itemed">
                                <a href="${ctx}/tenantSetting/index" target="iframe0"><i class="fa fa-sticky-note-o"></i>
                                    <span
                                            class="nav-label">移动终端系统设置</span> </a>
                            </li>
                        </c:if>

                        <c:if test="${user.userType == '0' || user.userType == '3'}">
                            <li class="layui-nav-item layui-nav-itemed">
                                <a href="${ctx}/tenantReceive/index" target="iframe0" class="mixy"><i class="fa fa-sticky-note-o"></i>
                                    <span
                                            class="nav-label">平台通知</span> </a>
                            </li>
                        </c:if>
&lt;%&ndash;                        <c:if test="${user.userType == '0'}">&ndash;%&gt;
&lt;%&ndash;                            <li class="layui-nav-item layui-nav-itemed">&ndash;%&gt;
&lt;%&ndash;                                <a href="https://monitor.jin-zhuang.cn/jinzhuang-saas-monitor/index.html#/tenantMonitorIndex?tenantCode=${user.tenantCode}"><i class="fa fa-sticky-note-o"></i>&ndash;%&gt;
&lt;%&ndash;                                    <span&ndash;%&gt;
&lt;%&ndash;                                            class="nav-label">监控中心</span> </a>&ndash;%&gt;
&lt;%&ndash;                            </li>&ndash;%&gt;
&lt;%&ndash;                        </c:if>&ndash;%&gt;
                    </c:otherwise>
                </c:choose>
            </ul>
        </div>--%>
    </div>



    <div class="layui-body">
        <div class="col-lg-12" id="topLink">
            <ol class="breadcrumb welcomeTips">
                <li>
                    <a href="#">欢迎使用${tenant.wechatName}管理平台</a>
                </li>
            </ol>
        </div>
        <!-- 内容主体区域 -->
        <iframe id="iframe0" name="iframe0" width="100%" <c:if
                test="${hasConsolePermission == '1'}"> src="${ctx}${showPage}"</c:if>
                frameborder="0" scrolling="no" seamless>
        </iframe>
    </div>
</div>
<%--<div class="layui-footer">--%>
<%--<!-- 底部固定区域 -->--%>
<%--© layui.com - 底部固定区域--%>
<%--</div>--%>
</div>
<script src="${ctx}/libjs/plugins/newEdition/newEdition.js"></script>
<%--<script src="../src/layui.js"></script>--%>
<script>
    <%--function jumpon(){--%>
    <%--    top.location.href = "${ctx}/templates/tenantReceive.jsp";--%>
    <%--}--%>
    $(function(){
            $.ajax({
                url:  jsctx + "/tenantReceive/tenantReceiveIsRead",
                type: "get",
                // data: {
                //     'tenantNoticeId': tenantNoticeId
                // },
                success: function (data) {
                    // layer.close(index);
                    if (data.status == 200) {
                        // layer.msg("删除成功");
                        // reLoad();
                        // console.log('1');
                        console.log(data.data);
                       if(data.data != '0'&&data.data !=null)
                       {

                           $('.pic_num').css('display','block');
                           if(data.data >= 10){
                               data.data = '...';
                           }
                           $('.pic_num').text(data.data);
                       }
                       if(data.data == '0'||data.data == null)
                       {
                           $('.pic_num').css('display','none');
                       }
                       // else
                       // {
                       //
                       //     // $('.pic_num').attr('background','');
                       //     // $('.pic_fa').attr('display','none');
                       // }
                    } else {
                        layer.msg(data.message);
                    }
                }
            });

    })
    $('.big_bell').on('click',function(){

<%--        ${user}.userType = 0;--%>
        $('a.fiter>span').trigger('click')
        $('a.mixy>span').trigger('click')
    })
    //火狐浏览器兼容滑动条
    $(".layui-nav-bar").attr("class", "zorder:999;");
    //重新渲染
    // element.render();
</script>
</body>
</html>
